package controller;

import model.Shop;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/")
public class JSONController {

	@RequestMapping(value = "{name}", method = RequestMethod.GET)
	@ResponseBody
	public Shop getShopInJSON(@PathVariable String name) {
		final Shop shop = new Shop();
		shop.setName(name);
		shop.setStaffName(new String[] { "testa", "testb" });
		return shop;
	}

}